package com.apps.globals.activity.model.po;

import java.math.BigDecimal;

import com.apps.globals.activity.enums.ActivityType;
import com.apps.sannotation.constraints.NumDef;
import com.apps.sannotation.constraints.StrDef;
import com.apps.sannotation.constraints.StrEnums;
import com.apps.sannotation.identity.GmtCreate;
import com.apps.sannotation.identity.GmtModify;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 大鹏
 * @since 2020-10-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("kupa_activity")
public class KupaActivity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * GOODS=这个活动作用于商品,RECHARGE=这个活动作用于充值,OPENVIP=开通VIP
     */
    @StrEnums(enums = ActivityType.class)
    private String type;

    /**
     * 作用于哪个类别的商品，如果为-1则作用于整个网站所有商品
     */
    private Integer goods_cat;

    /**
     * 优惠金额
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal amount_price;

    /**
     * 满多少触发活动
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal condition_price;

    /**
     * 开始时间
     */
    private LocalDateTime gmt_start;

    /**
     * 结束时间
     */
    private LocalDateTime gmt_end;

    @GmtCreate
    private LocalDateTime gmt_create;
    @GmtModify
    private LocalDateTime gmt_modify;
    @StrDef("")
    private String remark;


    public static final String ID = "id";

    public static final String TYPE = "type";

    public static final String GOODS_CAT = "goods_cat";

    public static final String AMOUNT_PRICE = "amount_price";

    public static final String CONDITION_PRICE = "condition_price";

    public static final String GMT_START = "gmt_start";

    public static final String GMT_END = "gmt_end";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFY = "gmt_modify";

    public static final String REMARK = "remark";

}
